﻿using System;

namespace WeiSha.Core
{
	// Token: 0x0200000D RID: 13
	public class Entity
	{
		// Token: 0x17000016 RID: 22
		// (get) Token: 0x06000054 RID: 84 RVA: 0x00003DE6 File Offset: 0x00001FE6
		public static Entity Get
		{
			get
			{
				return Entity._get;
			}
		}

		// Token: 0x06000055 RID: 85 RVA: 0x00002EA2 File Offset: 0x000010A2
		private Entity()
		{
		}

		// Token: 0x17000017 RID: 23
		public string this[string key]
		{
			get
			{
				string text = PlatformInfoHandler.Node("Entity").ItemValue(key);
				bool flag = string.IsNullOrWhiteSpace(text);
				string text2;
				if (flag)
				{
					text2 = key;
				}
				else
				{
					text2 = text;
				}
				return text2;
			}
		}

		// Token: 0x06000057 RID: 87 RVA: 0x00003E24 File Offset: 0x00002024
		public bool GetVisible(string key)
		{
			bool flag2;
			try
			{
				bool flag = PlatformInfoHandler.Node("Entity")[key] == null;
				if (flag)
				{
					flag2 = true;
				}
				else
				{
					string text = PlatformInfoHandler.Node("Entity")[key].Attribute("visible");
					bool flag3 = string.IsNullOrWhiteSpace(text);
					if (flag3)
					{
						flag2 = true;
					}
					else
					{
						flag2 = !(text.Trim().ToLower() == "false");
					}
				}
			}
			catch
			{
				flag2 = false;
			}
			return flag2;
		}

		// Token: 0x04000018 RID: 24
		private static readonly Entity _get = new Entity();
	}
}
